package listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

/**
 * Application Lifecycle Listener implementation class SessionListener
 *
 */
@WebListener
public class SessionListener implements HttpSessionListener {

	 @Override
	    public void sessionCreated(HttpSessionEvent se) {
	        System.out.println("会话创建：" + se.getSession().getId());
	    }
	  
	    @Override
	    public void sessionDestroyed(HttpSessionEvent se) {
	        System.out.println("会话销毁：" + se.getSession().getId());
	    }
	}
